package com.frank.jpaSpecification.repository;

import com.frank.jpaSpecification.entity.Mobile;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Component;

import java.util.Optional;

/**
 * @author 小石潭记
 * @date 2020/12/12 14:21
 * @Description: ${todo}
 */
@Component
public interface MobileRepository extends PagingAndSortingRepository<Mobile, Integer>, JpaSpecificationExecutor<Mobile> {

    int countByBranch(String branch);

    Optional<Mobile> findByBranch(String branch);
}
